'use strict';

module.exports = appInfo => {
  const config = (exports = {});

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1550115164450_9603';
  // add your config here
  config.middleware = [ 'errorHandle', 'cors' ];

  config.security = {
    csrf: {
      enable: false,
    },
  };
  config.logger = {
    consoleLevel: 'DEBUG',
  };

  config.mongoose = {
    url: process.env.EGG_MONGODB_URL || 'mongodb://127.0.0.1:27017/SignSystem',
    options: {
      server: {
        poolSize: 20,
      },
      reconnectTries: 1,
      reconnectInterval: 500,
    },
  };

  return config;
};
